package luogu;

import java.util.Scanner;

public class Main16 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        int [] press = {1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,4,1,2,3,1,2,3,4};
        int count = 0;
        for (char c : s.toCharArray()) {
            if (c==' '){
                count++;
            }else {
                count+=press[c-'a'];
            }
        }
        System.out.println(count);
    }
}
